#!/usr/bin/env python3
import sys

from machine import Machine
from lib import fatal


def main():
    if len(sys.argv) < 2:
        fatal("Error: Please provide the program file to load.")

    machine = Machine()
    machine.machine_load_program(sys.argv[1])
    print(f"entry: 0x{machine.entry:x}")

if __name__ == "__main__":
    main()
